home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume6 / xfig2 / patch6.2 < prev    next >
Encoding:
Internet Message Format  |  1993-04-28  |  56.9 KB

  1. From: envbvs@epb2.lbl.gov (Brian V. Smith)
  2. Newsgroups: comp.sources.x
  3. Subject: v06i082: xfig 2.0, Patch6, Part02/06
  4. Message-ID: <134788@sun.Eng.Sun.COM>
  5. Date: 24 Apr 90 22:25:50 GMT
  6. Approved: argv@sun.com
  7.  
  8. Submitted-by: envbvs@epb2.lbl.gov (Brian V. Smith)
  9. Posting-number: Volume 6, Issue 82
  10. Archive-name: xfig2/patch6.2
  11. Patch-To: xfig2: Volume 6, Issues: 9-24, 34-36, 50-56
  12.  
  13. #! /bin/sh
  14. # This is a shell archive.  Remove anything before this line, then unpack
  15. # it by saving it into a file and typing "sh file".  To overwrite existing
  16. # files, type "sh file -c".  You can also feed this as standard input via
  17. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  18. # will see the following message at the end:
  19. #        "End of archive 2 (of 6)."
  20. # Contents:  CHANGES.diff Imakefile.diff addpt.c.diff char.c.diff
  21. #   copy.c.diff ellipse.c.diff f2ps.c.diff global.c.diff main.c.diff
  22. #   move.c.diff msgsw.c.diff popup.c.diff printfonts.c.diff
  23. #   scale.c.diff util.c.diff
  24. # Wrapped by envbvs@epb2.lbl.gov on Tue Apr 24 11:56:45 1990
  25. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  26. if test -f 'CHANGES.diff' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'CHANGES.diff'\"
  28. else
  29. echo shar: Extracting \"'CHANGES.diff'\" \(4138 characters\)
  30. sed "s/^X//" >'CHANGES.diff' <<'END_OF_FILE'
  31. X*** CHANGES.old    Tue Apr 24 11:48:02 1990
  32. X--- CHANGES    Tue Apr 24 11:33:30 1990
  33. X***************
  34. X*** 1,6 ****
  35. X  Version 2.0 
  36. X  
  37. X! Patchlevel 5
  38. X  Changes from patchlevel 4:
  39. X  
  40. X  o Line widths of zero now allowed for drawing borderless objects
  41. X--- 1,40 ----
  42. X  Version 2.0 
  43. X  
  44. X! Patchlevel 6
  45. X! Changes from patchlevel 5:
  46. X! 
  47. X! o *** New popup menu to change characteristics of existing objects, 
  48. X!    e.g. line thickness, style, text options, area fill etc.
  49. X!    Not ALL things may be modified yet (e.g. arrows on lines).
  50. X!    Jon Tombs and Frank Schmuck provided this much-needed feature
  51. X! o Because the popup menu uses the new Simple Menu widget from R4, xfig
  52. X!    will no longer compile under R3
  53. X! o Fixed WMHints to "or" in InputHint to retain any existing Hints
  54. X!   Thanks to David Elliott
  55. X! o Doesn't let one delete to fewer than 3 points in interpolated spline
  56. X! o Removed unused variables
  57. X! o Changed rounded-corner box objects to have radius component instead 
  58. X!    of using the pen component (new protocol version 2.0 and 2.0-TFX)
  59. X! o Added back support to read protocol version 1.3 files
  60. X! o Fixed bug where the line style wasn't passed in drawing bounding 
  61. X!    rectangle when moving/copying objects
  62. X! o Fixed cursor for popup command menu
  63. X! o Fixed bounding box bug for postscript output from f2ps
  64. X! o Fixed bug that erroneously allowed filled polylines (only polygons, boxes,
  65. X!    round-corner boxes, ellipses, circles, closed splines and arcs may be filled)
  66. X! o Fixed name of AvantGarde-Book font (was AvantGarde)
  67. X! o Added two X fonts that are similar to AvantGarde... and Palatino...
  68. X!    From Dave Davey 
  69. X! o Fixed bug that caused coredump when referencing a zero-radius ellipse
  70. X! o Added back the LaTex buttons even for non-TFX mode
  71. X! o More SYSV #ifdefs from Scott E. Garfinkle (dacseg@uts.amdahl.com)
  72. X! o New rule in Imakefile to install troff_ft_codes file
  73. X! o put_fmsg() uses double arguments instead of float to prevent some 
  74. X!     systems from choking on float-double-float conversions of invalid data.
  75. X! o 8-bit characters allowed for text objects
  76. X!     From Tor Lillqvist <tml@hemuli.tik.vtt.fi>
  77. X! 
  78. X! Patchlevel 5 (3/27/90)
  79. X  Changes from patchlevel 4:
  80. X  
  81. X  o Line widths of zero now allowed for drawing borderless objects
  82. X***************
  83. X*** 25,31 ****
  84. X  o line width and font support for f2p (pic)
  85. X    Thanks to Dave Davey for these additions
  86. X  
  87. X! Patchlevel 4
  88. X  Changes from patchlevel 3:
  89. X  
  90. X  o Bug fixed in drawing zero-length lines with arrows
  91. X--- 59,65 ----
  92. X  o line width and font support for f2p (pic)
  93. X    Thanks to Dave Davey for these additions
  94. X  
  95. X! Patchlevel 4 (3/12/90)
  96. X  Changes from patchlevel 3:
  97. X  
  98. X  o Bug fixed in drawing zero-length lines with arrows
  99. X***************
  100. X*** 53,59 ****
  101. X  o Drawing too-narrow ellipses doesn't loop forever anymore, but they
  102. X    are still not drawn correctly
  103. X  
  104. X! Patchlevel 3
  105. X  Changes from patchlevel 2:
  106. X  
  107. X  o now uses XtAddTimer instead of setitimer() for blinking cursor
  108. X--- 87,93 ----
  109. X  o Drawing too-narrow ellipses doesn't loop forever anymore, but they
  110. X    are still not drawn correctly
  111. X  
  112. X! Patchlevel 3 (2/28/90)
  113. X  Changes from patchlevel 2:
  114. X  
  115. X  o now uses XtAddTimer instead of setitimer() for blinking cursor
  116. X***************
  117. X*** 62,68 ****
  118. X  o added put_fmsg() to print messages with floating point numbers
  119. X    Some machines (MIPS) were dumping core when passing floats as ints.
  120. X  
  121. X! Patchlevel 2
  122. X  Changes from patchlevel 1:
  123. X  
  124. X  o removed call to free() in curve() which was causing coredumps
  125. X--- 96,102 ----
  126. X  o added put_fmsg() to print messages with floating point numbers
  127. X    Some machines (MIPS) were dumping core when passing floats as ints.
  128. X  
  129. X! Patchlevel 2 (2/23/90)
  130. X  Changes from patchlevel 1:
  131. X  
  132. X  o removed call to free() in curve() which was causing coredumps
  133. X***************
  134. X*** 69,75 ****
  135. X  o Imakefile had .o filenames in SRCS definition
  136. X  
  137. X  
  138. X! Patchlevel 1
  139. X  Changes from patchlevel 0:
  140. X  
  141. X  o included definition of put_msg()/FREE/CFREE in f2ps.c
  142. X--- 103,109 ----
  143. X  o Imakefile had .o filenames in SRCS definition
  144. X  
  145. X  
  146. X! Patchlevel 1 (2/20/90)
  147. X  Changes from patchlevel 0:
  148. X  
  149. X  o included definition of put_msg()/FREE/CFREE in f2ps.c
  150. END_OF_FILE
  151. if test 4138 -ne `wc -c <'CHANGES.diff'`; then
  152.     echo shar: \"'CHANGES.diff'\" unpacked with wrong size!
  153. fi
  154. # end of 'CHANGES.diff'
  155. fi
  156. if test -f 'Imakefile.diff' -a "${1}" != "-c" ; then 
  157.   echo shar: Will not clobber existing file \"'Imakefile.diff'\"
  158. else
  159. echo shar: Extracting \"'Imakefile.diff'\" \(3153 characters\)
  160. sed "s/^X//" >'Imakefile.diff' <<'END_OF_FILE'
  161. X*** Imakefile.old    Tue Apr 24 11:48:04 1990
  162. X--- Imakefile    Fri Apr 13 14:56:21 1990
  163. X***************
  164. X*** 1,11 ****
  165. X! SYS_LIBRARIES = -lm
  166. X! DEPLIBS = XawClientDepLibs
  167. X! LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
  168. X  
  169. X  
  170. X  XFIGSRC =    addpt.c arc.c arcbox.c arrow.c autoarrow.c bitmap.c\
  171. X!         blink.c bound.c box.c break.c canvas.c changestyle.c\
  172. X!         changetext.c changethick.c  char.c color.c copy.c\
  173. X          cursor.c curve.c deletept.c dir.c drag.c draw.c\
  174. X          ellipse.c file.c flip.c font.c free.c geom.c\
  175. X          global.c glue.c graphics.c grid.c intspline.c\
  176. X--- 1,15 ----
  177. X! SYS_LIBRARIES=         -lm
  178. X! DEPLIBS =         XawClientDepLibs
  179. X! LOCAL_LIBRARIES =     XawClientLibs
  180. X! FONTFILE =         troff_ft_codes
  181. X! FONTLIBDIR =         /usr/lib/X11/troff
  182. X! DEFINES =         -DFONTFILE=\"$(FONTFILE)\"\
  183. X!             -DFONTLIBDIR=\"$(FONTLIBDIR)\"
  184. X  
  185. X  
  186. X  XFIGSRC =    addpt.c arc.c arcbox.c arrow.c autoarrow.c bitmap.c\
  187. X!         blink.c bound.c box.c break.c canvas.c change.c\
  188. X!         color.c char.c copy.c\
  189. X          cursor.c curve.c deletept.c dir.c drag.c draw.c\
  190. X          ellipse.c file.c flip.c font.c free.c geom.c\
  191. X          global.c glue.c graphics.c grid.c intspline.c\
  192. X***************
  193. X*** 16,23 ****
  194. X          spline.c text.c trans.c turn.c undo.c util.c xtra.c
  195. X  
  196. X  XFIGOBJ =    addpt.o arc.o arcbox.o arrow.o autoarrow.o bitmap.o\
  197. X!         blink.o bound.o box.o break.o canvas.o changestyle.o\
  198. X!         changetext.o changethick.o char.o color.o copy.o\
  199. X          cursor.o curve.o deletept.o dir.o drag.o draw.o\
  200. X          ellipse.o file.o flip.o font.o free.o geom.o global.o\
  201. X          glue.o graphics.o grid.o intspline.o latex_line.o\
  202. X--- 20,27 ----
  203. X          spline.c text.c trans.c turn.c undo.c util.c xtra.c
  204. X  
  205. X  XFIGOBJ =    addpt.o arc.o arcbox.o arrow.o autoarrow.o bitmap.o\
  206. X!         blink.o bound.o box.o break.o canvas.o change.o\
  207. X!         color.o char.o copy.o\
  208. X          cursor.o curve.o deletept.o dir.o drag.o draw.o\
  209. X          ellipse.o file.o flip.o font.o free.o geom.o global.o\
  210. X          glue.o graphics.o grid.o intspline.o latex_line.o\
  211. X***************
  212. X*** 27,37 ****
  213. X          rotate.o ruler.o save.o scale.o search.o spline.o\
  214. X          text.o trans.o turn.o undo.o util.o xtra.o
  215. X  
  216. X! F2PSRC =        arrow.c f2p.c free.c read.c troff_fonts.c psfonts.c
  217. X! F2POBJ =        arrow.o f2p.o free.o read.o troff_fonts.o psfonts.o
  218. X  
  219. X! F2PSSRC =       arrow.c bound.c f2ps.c free.c read.c psfonts.c
  220. X! F2PSOBJ =       arrow.o bound.o f2ps.o free.o read.o psfonts.o
  221. X  
  222. X  SRCS1 = $(XFIGSRC)
  223. X  OBJS1 = $(XFIGOBJ)
  224. X--- 31,41 ----
  225. X          rotate.o ruler.o save.o scale.o search.o spline.o\
  226. X          text.o trans.o turn.o undo.o util.o xtra.o
  227. X  
  228. X! F2PSRC =        arrow.c f2p.c free.c read.c read1_3.c troff_fonts.c psfonts.c
  229. X! F2POBJ =        arrow.o f2p.o free.o read.o read1_3.o troff_fonts.o psfonts.o
  230. X  
  231. X! F2PSSRC =       arrow.c bound.c f2ps.c free.c read.c read1_3.c psfonts.c
  232. X! F2PSOBJ =       arrow.o bound.o f2ps.o free.o read.o read1_3.o psfonts.o
  233. X  
  234. X  SRCS1 = $(XFIGSRC)
  235. X  OBJS1 = $(XFIGOBJ)
  236. X***************
  237. X*** 47,49 ****
  238. X--- 51,60 ----
  239. X  ComplexProgramTarget_2(f2p,,)
  240. X  
  241. X  ComplexProgramTarget_3(f2ps,,)
  242. X+ 
  243. X+ install:: $(DESTDIR)$(FONTLIBDIR)
  244. X+ 
  245. X+ $(DESTDIR)$(FONTLIBDIR):
  246. X+     mkdir $(DESTDIR)$(FONTLIBDIR)
  247. X+ 
  248. X+ InstallNonExec(troff_ft_codes,$(DESTDIR)$(FONTLIBDIR)/$(FONTFILE))
  249. END_OF_FILE
  250. if test 3153 -ne `wc -c <'Imakefile.diff'`; then
  251.     echo shar: \"'Imakefile.diff'\" unpacked with wrong size!
  252. fi
  253. # end of 'Imakefile.diff'
  254. fi
  255. if test -f 'addpt.c.diff' -a "${1}" != "-c" ; then 
  256.   echo shar: Will not clobber existing file \"'addpt.c.diff'\"
  257. else
  258. echo shar: Extracting \"'addpt.c.diff'\" \(2911 characters\)
  259. sed "s/^X//" >'addpt.c.diff' <<'END_OF_FILE'
  260. X*** addpt.c.old    Tue Apr 24 11:48:05 1990
  261. X--- addpt.c    Mon Apr 16 11:19:12 1990
  262. X***************
  263. X*** 93,99 ****
  264. X  {
  265. X      find_endpoints(cur_spline->points, px, py, &left_point, &right_point);
  266. X      set_temp_cursor(&null_cursor);
  267. X!     win_setmouseposition(canvas_swfd, px, py);
  268. X      cur_x = px; cur_y = py;
  269. X      if (left_point == NULL && closed_spline(cur_spline)) {
  270. X          /* The added_point is between the 1st and 2nd point. */
  271. X--- 93,99 ----
  272. X  {
  273. X      find_endpoints(cur_spline->points, px, py, &left_point, &right_point);
  274. X      set_temp_cursor(&null_cursor);
  275. X!     win_setmouseposition(canvas_win, px, py);
  276. X      cur_x = px; cur_y = py;
  277. X      if (left_point == NULL && closed_spline(cur_spline)) {
  278. X          /* The added_point is between the 1st and 2nd point. */
  279. X***************
  280. X*** 182,188 ****
  281. X  {
  282. X      find_endpoints(cur_line->points,px,py,&left_point,&right_point);
  283. X      set_temp_cursor(&null_cursor);
  284. X!     win_setmouseposition(canvas_swfd, px, py);
  285. X      cur_x = fix_x = px; cur_y = fix_y = py;
  286. X      if (left_point == NULL && cur_line->type == T_POLYGON) {
  287. X          left_point = right_point;
  288. X--- 182,188 ----
  289. X  {
  290. X      find_endpoints(cur_line->points,px,py,&left_point,&right_point);
  291. X      set_temp_cursor(&null_cursor);
  292. X!     win_setmouseposition(canvas_win, px, py);
  293. X      cur_x = fix_x = px; cur_y = fix_y = py;
  294. X      if (left_point == NULL && cur_line->type == T_POLYGON) {
  295. X          left_point = right_point;
  296. X***************
  297. X*** 189,195 ****
  298. X          right_point = right_point->next;
  299. X          }
  300. X      if (left_point != NULL && right_point != NULL)
  301. X!         pw_vector(canvas_pixwin, left_point->x, left_point->y,
  302. X          right_point->x, right_point->y, INV_PAINT, 
  303. X          cur_line->thickness, cur_line->style, cur_line->style_val);
  304. X      draw_addedlink(INV_PAINT);
  305. X--- 189,195 ----
  306. X          right_point = right_point->next;
  307. X          }
  308. X      if (left_point != NULL && right_point != NULL)
  309. X!         pw_vector(canvas_win, left_point->x, left_point->y,
  310. X          right_point->x, right_point->y, INV_PAINT, 
  311. X          cur_line->thickness, cur_line->style, cur_line->style_val);
  312. X      draw_addedlink(INV_PAINT);
  313. X***************
  314. X*** 231,238 ****
  315. X      wrapup_pointadding();
  316. X      }
  317. X  
  318. X! mm_fix_linepoint_adding(x, y)
  319. X! int    x, y;
  320. X  {
  321. X      F_point        *p;
  322. X  
  323. X--- 231,237 ----
  324. X      wrapup_pointadding();
  325. X      }
  326. X  
  327. X! mm_fix_linepoint_adding()
  328. X  {
  329. X      F_point        *p;
  330. X  
  331. X***************
  332. X*** 311,321 ****
  333. X  int    op;
  334. X  {
  335. X      if (left_point != NULL) {
  336. X!         pw_vector(canvas_pixwin, left_point->x, left_point->y,
  337. X              cur_x, cur_y, op, 1, SOLID_LINE, 0.0);
  338. X         }
  339. X      if (right_point != NULL) {
  340. X!         pw_vector(canvas_pixwin, right_point->x, 
  341. X              right_point->y, cur_x, cur_y, op, 1, SOLID_LINE, 0.0);
  342. X          }
  343. X      }
  344. X--- 310,320 ----
  345. X  int    op;
  346. X  {
  347. X      if (left_point != NULL) {
  348. X!         pw_vector(canvas_win, left_point->x, left_point->y,
  349. X              cur_x, cur_y, op, 1, SOLID_LINE, 0.0);
  350. X         }
  351. X      if (right_point != NULL) {
  352. X!         pw_vector(canvas_win, right_point->x, 
  353. X              right_point->y, cur_x, cur_y, op, 1, SOLID_LINE, 0.0);
  354. X          }
  355. X      }
  356. END_OF_FILE
  357. if test 2911 -ne `wc -c <'addpt.c.diff'`; then
  358.     echo shar: \"'addpt.c.diff'\" unpacked with wrong size!
  359. fi
  360. # end of 'addpt.c.diff'
  361. fi
  362. if test -f 'char.c.diff' -a "${1}" != "-c" ; then 
  363.   echo shar: Will not clobber existing file \"'char.c.diff'\"
  364. else
  365. echo shar: Extracting \"'char.c.diff'\" \(4234 characters\)
  366. sed "s/^X//" >'char.c.diff' <<'END_OF_FILE'
  367. X*** char.c.old    Tue Apr 24 11:48:11 1990
  368. X--- char.c    Wed Apr 18 09:35:11 1990
  369. X***************
  370. X*** 14,20 ****
  371. X  
  372. X  extern int        cur_x, cur_y;
  373. X  extern int        cur_font, cur_fontsize;
  374. X! extern int        cur_texttype;
  375. X  
  376. X  #define            BLINK_INTERVAL    700    /* milliseconds blink rate */
  377. X  #define            BUF_SIZE    400
  378. X--- 14,20 ----
  379. X  
  380. X  extern int        cur_x, cur_y;
  381. X  extern int        cur_font, cur_fontsize;
  382. X! extern int        cur_textjust;
  383. X  
  384. X  #define            BLINK_INTERVAL    700    /* milliseconds blink rate */
  385. X  #define            BUF_SIZE    400
  386. X***************
  387. X*** 44,50 ****
  388. X  int        (*cr)();
  389. X  int        bx, by;
  390. X  {
  391. X- char c;
  392. X      pw = p;
  393. X      cr_proc = cr;
  394. X      rbase_x = obase_x = cbase_x = bx;    /* keep real base so dont have roundoff */
  395. X--- 44,49 ----
  396. X***************
  397. X*** 84,90 ****
  398. X      }
  399. X  
  400. X  char_handler(c)
  401. X! char    c;
  402. X  {
  403. X      int cwidth; 
  404. X  
  405. X--- 83,89 ----
  406. X      }
  407. X  
  408. X  char_handler(c)
  409. X! unsigned char c;
  410. X  {
  411. X      int cwidth; 
  412. X  
  413. X***************
  414. X*** 97,110 ****
  415. X          erase_char_string();
  416. X          char_received = 1;
  417. X          cwidth = char_advance(canvas_font,prefix[leng_prefix-1]);
  418. X!         if (cur_texttype == T_LEFT_JUSTIFIED)
  419. X              rcur_x -= cwidth;    /* move the suffix to the left */
  420. X!         else if (cur_texttype == T_CENTER_JUSTIFIED)
  421. X              {
  422. X              rbase_x += cwidth/2.0;    /* advance right by half cwidth */
  423. X              rcur_x -= cwidth/2.0;    /* move suffix left half cwidth */
  424. X              }
  425. X!         if (cur_texttype == T_RIGHT_JUSTIFIED)
  426. X              rbase_x += (float) cwidth;    /* move the prefix to the right */
  427. X          prefix[--leng_prefix] = '\0';
  428. X          cbase_x = rbase_x;        /* fix */
  429. X--- 96,109 ----
  430. X          erase_char_string();
  431. X          char_received = 1;
  432. X          cwidth = char_advance(canvas_font,prefix[leng_prefix-1]);
  433. X!         if (cur_textjust == T_LEFT_JUSTIFIED)
  434. X              rcur_x -= cwidth;    /* move the suffix to the left */
  435. X!         else if (cur_textjust == T_CENTER_JUSTIFIED)
  436. X              {
  437. X              rbase_x += cwidth/2.0;    /* advance right by half cwidth */
  438. X              rcur_x -= cwidth/2.0;    /* move suffix left half cwidth */
  439. X              }
  440. X!         if (cur_textjust == T_RIGHT_JUSTIFIED)
  441. X              rbase_x += (float) cwidth;    /* move the prefix to the right */
  442. X          prefix[--leng_prefix] = '\0';
  443. X          cbase_x = rbase_x;        /* fix */
  444. X***************
  445. X*** 116,128 ****
  446. X          if (leng_prefix > 0) {
  447. X          erase_char_string();
  448. X          char_received = 1;
  449. X!         if (cur_texttype == T_CENTER_JUSTIFIED)
  450. X              {
  451. X              while (leng_prefix--) /* subtract half of the character widths */
  452. X              rcur_x -= char_advance(canvas_font,prefix[leng_prefix])/2.0;
  453. X              cur_x = cbase_x = rbase_x = rcur_x ;
  454. X              }
  455. X!         else if (cur_texttype == T_RIGHT_JUSTIFIED)
  456. X              cbase_x = rbase_x = cur_x = rcur_x;
  457. X          else
  458. X              cur_x = rcur_x = cbase_x = rbase_x;
  459. X--- 115,127 ----
  460. X          if (leng_prefix > 0) {
  461. X          erase_char_string();
  462. X          char_received = 1;
  463. X!         if (cur_textjust == T_CENTER_JUSTIFIED)
  464. X              {
  465. X              while (leng_prefix--) /* subtract half of the character widths */
  466. X              rcur_x -= char_advance(canvas_font,prefix[leng_prefix])/2.0;
  467. X              cur_x = cbase_x = rbase_x = rcur_x ;
  468. X              }
  469. X!         else if (cur_textjust == T_RIGHT_JUSTIFIED)
  470. X              cbase_x = rbase_x = cur_x = rcur_x;
  471. X          else
  472. X              cur_x = rcur_x = cbase_x = rbase_x;
  473. X***************
  474. X*** 139,152 ****
  475. X      else {
  476. X          erase_char_string();
  477. X          cwidth = char_advance(canvas_font,c);
  478. X!         if (cur_texttype == T_LEFT_JUSTIFIED)
  479. X              rcur_x += cwidth;    /* move the suffix to the right */
  480. X!         else if (cur_texttype == T_CENTER_JUSTIFIED)
  481. X          {
  482. X          rbase_x -= cwidth/2.0;        /* advance left by half cwidth */
  483. X          rcur_x += cwidth/2.0;        /* move suffix right half cwidth */
  484. X          }
  485. X!         if (cur_texttype == T_RIGHT_JUSTIFIED)
  486. X              rbase_x -= cwidth;    /* move the prefix to the left */
  487. X          char_received = 1;
  488. X          prefix[leng_prefix++] = c;
  489. X--- 138,151 ----
  490. X      else {
  491. X          erase_char_string();
  492. X          cwidth = char_advance(canvas_font,c);
  493. X!         if (cur_textjust == T_LEFT_JUSTIFIED)
  494. X              rcur_x += cwidth;    /* move the suffix to the right */
  495. X!         else if (cur_textjust == T_CENTER_JUSTIFIED)
  496. X          {
  497. X          rbase_x -= cwidth/2.0;        /* advance left by half cwidth */
  498. X          rcur_x += cwidth/2.0;        /* move suffix right half cwidth */
  499. X          }
  500. X!         if (cur_textjust == T_RIGHT_JUSTIFIED)
  501. X              rbase_x -= cwidth;    /* move the prefix to the left */
  502. X          char_received = 1;
  503. X          prefix[leng_prefix++] = c;
  504. END_OF_FILE
  505. if test 4234 -ne `wc -c <'char.c.diff'`; then
  506.     echo shar: \"'char.c.diff'\" unpacked with wrong size!
  507. fi
  508. # end of 'char.c.diff'
  509. fi
  510. if test -f 'copy.c.diff' -a "${1}" != "-c" ; then 
  511.   echo shar: Will not clobber existing file \"'copy.c.diff'\"
  512. else
  513. echo shar: Extracting \"'copy.c.diff'\" \(2905 characters\)
  514. sed "s/^X//" >'copy.c.diff' <<'END_OF_FILE'
  515. X*** copy.c.old    Tue Apr 24 11:48:11 1990
  516. X--- copy.c    Mon Apr 16 11:19:50 1990
  517. X***************
  518. X*** 63,69 ****
  519. X          compound = copy_compound(c);
  520. X          erase_pointmarker();
  521. X          set_temp_cursor(&null_cursor);
  522. X!         win_setmouseposition(canvas_swfd, px, py);
  523. X          clean_up();
  524. X          set_action_object(F_CREATE, O_COMPOUND);
  525. X          insert_compound(&objects.compounds, compound);
  526. X--- 63,69 ----
  527. X          compound = copy_compound(c);
  528. X          erase_pointmarker();
  529. X          set_temp_cursor(&null_cursor);
  530. X!         win_setmouseposition(canvas_win, px, py);
  531. X          clean_up();
  532. X          set_action_object(F_CREATE, O_COMPOUND);
  533. X          insert_compound(&objects.compounds, compound);
  534. X***************
  535. X*** 74,80 ****
  536. X          line = copy_line(l);
  537. X          erase_pointmarker();
  538. X          set_temp_cursor(&null_cursor);
  539. X!         win_setmouseposition(canvas_swfd, px, py);
  540. X          clean_up();
  541. X          set_action_object(F_CREATE, O_POLYLINE);
  542. X          insert_line(&objects.lines, line);
  543. X--- 74,80 ----
  544. X          line = copy_line(l);
  545. X          erase_pointmarker();
  546. X          set_temp_cursor(&null_cursor);
  547. X!         win_setmouseposition(canvas_win, px, py);
  548. X          clean_up();
  549. X          set_action_object(F_CREATE, O_POLYLINE);
  550. X          insert_line(&objects.lines, line);
  551. X***************
  552. X*** 95,101 ****
  553. X          ellipse = copy_ellipse(e);
  554. X          erase_pointmarker();
  555. X          set_temp_cursor(&null_cursor);
  556. X!         win_setmouseposition(canvas_swfd, px, py);
  557. X          clean_up();
  558. X          set_action_object(F_CREATE, O_ELLIPSE);
  559. X          insert_ellipse(&objects.ellipses, ellipse);
  560. X--- 95,101 ----
  561. X          ellipse = copy_ellipse(e);
  562. X          erase_pointmarker();
  563. X          set_temp_cursor(&null_cursor);
  564. X!         win_setmouseposition(canvas_win, px, py);
  565. X          clean_up();
  566. X          set_action_object(F_CREATE, O_ELLIPSE);
  567. X          insert_ellipse(&objects.ellipses, ellipse);
  568. X***************
  569. X*** 106,112 ****
  570. X          arc = copy_arc(a);
  571. X          erase_pointmarker();
  572. X          set_temp_cursor(&null_cursor);
  573. X!         win_setmouseposition(canvas_swfd, px, py);
  574. X          clean_up();
  575. X          set_action_object(F_CREATE, O_ARC);
  576. X          insert_arc(&objects.arcs, arc);
  577. X--- 106,112 ----
  578. X          arc = copy_arc(a);
  579. X          erase_pointmarker();
  580. X          set_temp_cursor(&null_cursor);
  581. X!         win_setmouseposition(canvas_win, px, py);
  582. X          clean_up();
  583. X          set_action_object(F_CREATE, O_ARC);
  584. X          insert_arc(&objects.arcs, arc);
  585. X***************
  586. X*** 117,123 ****
  587. X          spline = copy_spline(s);
  588. X          erase_pointmarker();
  589. X          set_temp_cursor(&null_cursor);
  590. X!         win_setmouseposition(canvas_swfd, px, py);
  591. X          clean_up();
  592. X          set_action_object(F_CREATE, O_SPLINE);
  593. X          insert_spline(&objects.splines, spline);
  594. X--- 117,123 ----
  595. X          spline = copy_spline(s);
  596. X          erase_pointmarker();
  597. X          set_temp_cursor(&null_cursor);
  598. X!         win_setmouseposition(canvas_win, px, py);
  599. X          clean_up();
  600. X          set_action_object(F_CREATE, O_SPLINE);
  601. X          insert_spline(&objects.splines, spline);
  602. END_OF_FILE
  603. if test 2905 -ne `wc -c <'copy.c.diff'`; then
  604.     echo shar: \"'copy.c.diff'\" unpacked with wrong size!
  605. fi
  606. # end of 'copy.c.diff'
  607. fi
  608. if test -f 'ellipse.c.diff' -a "${1}" != "-c" ; then 
  609.   echo shar: Will not clobber existing file \"'ellipse.c.diff'\"
  610. else
  611. echo shar: Extracting \"'ellipse.c.diff'\" \(2492 characters\)
  612. sed "s/^X//" >'ellipse.c.diff' <<'END_OF_FILE'
  613. X*** ellipse.c.old    Tue Apr 24 11:48:14 1990
  614. X--- ellipse.c    Mon Apr 16 11:25:22 1990
  615. X***************
  616. X*** 50,57 ****
  617. X  center_marker(x, y)
  618. X  int    x, y;
  619. X  {
  620. X!     pw_vector(canvas_pixwin, x, y-2, x, y+2, INV_PAINT, 1, SOLID_LINE, 0.0);
  621. X!     pw_vector(canvas_pixwin, x-2, y, x+2, y, INV_PAINT, 1, SOLID_LINE, 0.0);
  622. X      }
  623. X  
  624. X  ellipsebyradius_drawing_selected()
  625. X--- 50,57 ----
  626. X  center_marker(x, y)
  627. X  int    x, y;
  628. X  {
  629. X!     pw_vector(canvas_win, x, y-2, x, y+2, INV_PAINT, 1, SOLID_LINE, 0.0);
  630. X!     pw_vector(canvas_win, x-2, y, x+2, y, INV_PAINT, 1, SOLID_LINE, 0.0);
  631. X      }
  632. X  
  633. X  ellipsebyradius_drawing_selected()
  634. X***************
  635. X*** 122,129 ****
  636. X      ellipse->angle = cur_angle;
  637. X      ellipse->color = cur_color;
  638. X      ellipse->depth = 0;
  639. X!     ellipse->pen = NULL;
  640. X!     /* added 3/1/89 B.V.Smith */
  641. X      ellipse->area_fill = fill_mode? cur_areafill : 0;
  642. X      ellipse->direction = 1;
  643. X      ellipse->center.x = fix_x;
  644. X--- 122,128 ----
  645. X      ellipse->angle = cur_angle;
  646. X      ellipse->color = cur_color;
  647. X      ellipse->depth = 0;
  648. X!     ellipse->pen = 0;
  649. X      ellipse->area_fill = fill_mode? cur_areafill : 0;
  650. X      ellipse->direction = 1;
  651. X      ellipse->center.x = fix_x;
  652. X***************
  653. X*** 275,281 ****
  654. X      y1 = fix_y + radius;
  655. X      y2 = fix_y - radius;
  656. X      draw_rectbox(x1, y1, x2, y2, op);
  657. X!     pw_vector(canvas_pixwin, fix_x, fix_y, cur_x, cur_y, op, 1, SOLID_LINE, 0.0);
  658. X      }
  659. X  
  660. X  create_circlebyrad(x, y)
  661. X--- 274,280 ----
  662. X      y1 = fix_y + radius;
  663. X      y2 = fix_y - radius;
  664. X      draw_rectbox(x1, y1, x2, y2, op);
  665. X!     pw_vector(canvas_win, fix_x, fix_y, cur_x, cur_y, op, 1, SOLID_LINE, 0.0);
  666. X      }
  667. X  
  668. X  create_circlebyrad(x, y)
  669. X***************
  670. X*** 368,374 ****
  671. X      y1 = fix_y + ry + radius;
  672. X      y2 = fix_y + ry - radius;
  673. X      draw_rectbox(x1, y1, x2, y2, op);
  674. X!     pw_vector(canvas_pixwin, fix_x, fix_y, cur_x, cur_y, op, 1, SOLID_LINE, 0.0);
  675. X      }
  676. X  
  677. X  create_circlebydia(x, y)
  678. X--- 367,373 ----
  679. X      y1 = fix_y + ry + radius;
  680. X      y2 = fix_y + ry - radius;
  681. X      draw_rectbox(x1, y1, x2, y2, op);
  682. X!     pw_vector(canvas_win, fix_x, fix_y, cur_x, cur_y, op, 1, SOLID_LINE, 0.0);
  683. X      }
  684. X  
  685. X  create_circlebydia(x, y)
  686. X***************
  687. X*** 421,427 ****
  688. X  
  689. X      a = e->radiuses.x;
  690. X      b = e->radiuses.y;
  691. X!     curve(canvas_pixwin, a, 0, a, 0, e->direction, (b*b), (a*a), 
  692. X          e->center.x, e->center.y, op, 
  693. X          e->thickness, e->style, e->style_val, e->area_fill);
  694. X      }
  695. X--- 420,426 ----
  696. X  
  697. X      a = e->radiuses.x;
  698. X      b = e->radiuses.y;
  699. X!     curve(canvas_win, a, 0, a, 0, e->direction, (b*b), (a*a), 
  700. X          e->center.x, e->center.y, op, 
  701. X          e->thickness, e->style, e->style_val, e->area_fill);
  702. X      }
  703. END_OF_FILE
  704. if test 2492 -ne `wc -c <'ellipse.c.diff'`; then
  705.     echo shar: \"'ellipse.c.diff'\" unpacked with wrong size!
  706. fi
  707. # end of 'ellipse.c.diff'
  708. fi
  709. if test -f 'f2ps.c.diff' -a "${1}" != "-c" ; then 
  710.   echo shar: Will not clobber existing file \"'f2ps.c.diff'\"
  711. else
  712. echo shar: Extracting \"'f2ps.c.diff'\" \(3612 characters\)
  713. sed "s/^X//" >'f2ps.c.diff' <<'END_OF_FILE'
  714. X*** f2ps.c.old    Tue Apr 24 11:48:15 1990
  715. X--- f2ps.c    Mon Apr 23 14:44:04 1990
  716. X***************
  717. X*** 20,26 ****
  718. X  #define        DEFAULT_FONT_SIZE    11
  719. X  #define        DEFAULT_FONT        "Times-Roman"
  720. X  
  721. X! extern    struct _fstruct fontnames[];        /* printer font names */
  722. X  
  723. X  char        Usage[] = "Usage: %s [-P][-L][-f font][-s size][-e scale][-N][-c] [input [output]]\n";
  724. X  char        *prog;
  725. X--- 20,26 ----
  726. X  #define        DEFAULT_FONT_SIZE    11
  727. X  #define        DEFAULT_FONT        "Times-Roman"
  728. X  
  729. X! extern    struct _fstruct fontnames[];    /* printer font names */
  730. X  
  731. X  char        Usage[] = "Usage: %s [-P][-L][-f font][-s size][-e scale][-N][-c] [input [output]]\n";
  732. X  char        *prog;
  733. X***************
  734. X*** 35,41 ****
  735. X  double        reduction;    /* converts screen ppi to printer points */
  736. X  extern int    num_object;
  737. X  char        *from = NULL, *to = NULL;
  738. X! FILE        *ffp = NULL, *tfp = NULL;
  739. X  char        Err_incomp[] = "Incomplete %s object at line %d.";
  740. X  char        Err_mem[] = "Running out of memory.";
  741. X  
  742. X--- 35,41 ----
  743. X  double        reduction;    /* converts screen ppi to printer points */
  744. X  extern int    num_object;
  745. X  char        *from = NULL, *to = NULL;
  746. X! FILE        *tfp = NULL;
  747. X  char        Err_incomp[] = "Incomplete %s object at line %d.";
  748. X  char        Err_mem[] = "Running out of memory.";
  749. X  
  750. X***************
  751. X*** 110,116 ****
  752. X  {
  753. X      F_compound    objects;
  754. X      int        status;
  755. X-     char        c;
  756. X  
  757. X      get_args(argc, argv);
  758. X  
  759. X--- 110,115 ----
  760. X***************
  761. X*** 212,218 ****
  762. X      fprintf(tfp, "%%%%For: %s@%s (%s)\n",
  763. X              who->pw_name, host, who->pw_gecos);
  764. X      fprintf(tfp, "%%%%Pages: %d\n", show_page);
  765. X!     fprintf(tfp, "%%%%BoundingBox: %d %d %d %d\n", llx, lly, urx, ury);
  766. X      fprintf(tfp, "%%%%EndComments\n");
  767. X      fprintf(tfp, "%s\n", BEGIN_PROLOG);
  768. X      if (ellipse_exist(objects)) 
  769. X--- 211,218 ----
  770. X      fprintf(tfp, "%%%%For: %s@%s (%s)\n",
  771. X              who->pw_name, host, who->pw_gecos);
  772. X      fprintf(tfp, "%%%%Pages: %d\n", show_page);
  773. X!     fprintf(tfp, "%%%%BoundingBox: %d %d %d %d\n", llx, 
  774. X!             PAGE_HEIGHT-lly, urx, PAGE_HEIGHT-ury);
  775. X      fprintf(tfp, "%%%%EndComments\n");
  776. X      fprintf(tfp, "%s\n", BEGIN_PROLOG);
  777. X      if (ellipse_exist(objects)) 
  778. X***************
  779. X*** 270,276 ****
  780. X          origx = tx - llx;
  781. X          if (landscape)
  782. X          origx=0;
  783. X!         /*origx -= (dx-llx);*/
  784. X          urx = (llx=tx) + dx;
  785. X          ury = (PAGE_HEIGHT + dy) / 2.0;
  786. X          if (coord_system == 2)
  787. X--- 270,276 ----
  788. X          origx = tx - llx;
  789. X          if (landscape)
  790. X          origx=0;
  791. X!         origx -= (dx-llx);
  792. X          urx = (llx=tx) + dx;
  793. X          ury = (PAGE_HEIGHT + dy) / 2.0;
  794. X          if (coord_system == 2)
  795. X***************
  796. X*** 406,412 ****
  797. X          return;
  798. X  
  799. X      set_linewidth(l->thickness);
  800. X!     radius = l->pen;        /* radius of rounded-corner boxes */
  801. X      p = l->points;
  802. X      q = p->next;
  803. X      if (q == NULL) { /* A single point line */
  804. X--- 406,412 ----
  805. X          return;
  806. X  
  807. X      set_linewidth(l->thickness);
  808. X!     radius = l->radius;        /* radius of rounded-corner boxes */
  809. X      p = l->points;
  810. X      q = p->next;
  811. X      if (q == NULL) { /* A single point line */
  812. X***************
  813. X*** 523,529 ****
  814. X          fprintf(tfp, "\t%.3f %.3f %.3f %.3f %d %d curveto\n",
  815. X              a->rx, a->ry, b->lx, b->ly, q->x, q->y);
  816. X          a = b;
  817. X-         b = b->next;
  818. X          }
  819. X      if (closed_spline(s)) 
  820. X          {
  821. X--- 523,528 ----
  822. X***************
  823. X*** 582,588 ****
  824. X          fprintf(tfp, "%% Closed spline\n");
  825. X          fprintf(tfp, "newpath %.3f %.3f moveto\n", a, b);
  826. X          }
  827. X!     for (q = p->next; q != NULL; p = q, q = q->next) {
  828. X          x1 = x3; y1 = y3;
  829. X          x2 = c;  y2 = d;
  830. X          c = q->x; d = q->y;
  831. X--- 581,587 ----
  832. X          fprintf(tfp, "%% Closed spline\n");
  833. X          fprintf(tfp, "newpath %.3f %.3f moveto\n", a, b);
  834. X          }
  835. X!     for (q = p->next; q != NULL; q = q->next) {
  836. X          x1 = x3; y1 = y3;
  837. X          x2 = c;  y2 = d;
  838. X          c = q->x; d = q->y;
  839. END_OF_FILE
  840. if test 3612 -ne `wc -c <'f2ps.c.diff'`; then
  841.     echo shar: \"'f2ps.c.diff'\" unpacked with wrong size!
  842. fi
  843. # end of 'f2ps.c.diff'
  844. fi
  845. if test -f 'global.c.diff' -a "${1}" != "-c" ; then 
  846.   echo shar: Will not clobber existing file \"'global.c.diff'\"
  847. else
  848. echo shar: Extracting \"'global.c.diff'\" \(3407 characters\)
  849. sed "s/^X//" >'global.c.diff' <<'END_OF_FILE'
  850. X*** global.c.old    Tue Apr 24 11:48:18 1990
  851. X--- global.c    Tue Apr 17 16:34:40 1990
  852. X***************
  853. X*** 27,33 ****
  854. X  int            fix_x, fix_y;
  855. X  int            cur_x, cur_y;
  856. X  
  857. X- int            receiving_msg = 0;
  858. X  int            action_on = 0;
  859. X  int            pointmarker_shown = 0;
  860. X  int            compoundbox_shown = 0;
  861. X--- 27,32 ----
  862. X***************
  863. X*** 34,49 ****
  864. X  
  865. X  int            ICON_COLUMN;
  866. X  int            CANVAS_HEIGHT, CANVAS_WIDTH;
  867. X! int            CANVAS_LEFT, CANVAS_TOP;
  868. X! int            PANEL_LEFT, PANEL_TOP, PANEL_HEIGHT, PANEL_WID;
  869. X! int            PANEL2_LEFT, PANEL2_TOP, PANEL2_HEIGHT, PANEL2_WID;
  870. X! int            MSG_LEFT, MSG_TOP, MSG_WIDTH;
  871. X! int            SIDERULER_LEFT, SIDERULER_TOP;
  872. X  int            SIDERULER_WIDTH, SIDERULER_HEIGHT;
  873. X- int            SIDERULER_START;
  874. X- int            TOPRULER_LEFT, TOPRULER_TOP;
  875. X  int            TOPRULER_WIDTH, TOPRULER_HEIGHT;
  876. X- int            borderwid, windowspacing, toolstripeht;
  877. X  
  878. X  int            num_point;
  879. X  F_point            *first_point, *cur_point;
  880. X--- 33,41 ----
  881. X  
  882. X  int            ICON_COLUMN;
  883. X  int            CANVAS_HEIGHT, CANVAS_WIDTH;
  884. X! int            PANEL_WID, PANEL2_WID;
  885. X  int            SIDERULER_WIDTH, SIDERULER_HEIGHT;
  886. X  int            TOPRULER_WIDTH, TOPRULER_HEIGHT;
  887. X  
  888. X  int            num_point;
  889. X  F_point            *first_point, *cur_point;
  890. X***************
  891. X*** 110,128 ****
  892. X  float            cur_angle        = 0.0;
  893. X  int            cur_color        = BLACK;
  894. X  int            cur_textstyle        = PLAIN;
  895. X! int            cur_texttype        = T_LEFT_JUSTIFIED;
  896. X!     /* line thicknesses for each gc */
  897. X! int            gc_thickness[0x10]    = {1,1,1,1,1,1,1,1,    
  898. X!                            1,1,1,1,1,1,1,1};
  899. X! int            gc_line_style[0x10]    = {-1,-1,-1,-1,-1,-1,-1,-1,
  900. X!                          -1,-1,-1,-1,-1,-1,-1,-1};
  901. X! short            dot_image[16] = {
  902. X!                 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
  903. X!                 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
  904. X!                 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
  905. X!                 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
  906. X!                 };
  907. X! mpr_static(dot, 16, 16, 1, dot_image);
  908. X  
  909. X  /*************************  Flags/Resources  *******************************/
  910. X  
  911. X--- 102,111 ----
  912. X  float            cur_angle        = 0.0;
  913. X  int            cur_color        = BLACK;
  914. X  int            cur_textstyle        = PLAIN;
  915. X! int            cur_textjust        = T_LEFT_JUSTIFIED;
  916. X!         /* line thicknesses for each gc */
  917. X! int            gc_thickness[NUMOPS]    = {-1,-1,-1,-1};
  918. X! int            gc_line_style[NUMOPS]    = {-1,-1,-1,-1};
  919. X  
  920. X  /*************************  Flags/Resources  *******************************/
  921. X  
  922. X***************
  923. X*** 134,140 ****
  924. X  
  925. X  /************************  Status  ****************************/
  926. X  
  927. X! char            directory[128] = "";
  928. X  char            current_file[200] = "";
  929. X  int            cur_printer=0;
  930. X  char            *printer="";
  931. X--- 117,123 ----
  932. X  
  933. X  /************************  Status  ****************************/
  934. X  
  935. X! char            directory[1024];
  936. X  char            current_file[200] = "";
  937. X  int            cur_printer=0;
  938. X  char            *printer="";
  939. X***************
  940. X*** 169,181 ****
  941. X  
  942. X  reset_cursor()
  943. X  {
  944. X!     XDefineCursor(tool_d, canvas_swfd, (Cursor)cur_cursor->bitmap);
  945. X      }
  946. X  
  947. X  set_temp_cursor(cursor)
  948. X  CURSOR    cursor;
  949. X  {
  950. X!     XDefineCursor(tool_d, canvas_swfd, (Cursor)cursor->bitmap);
  951. X      }
  952. X  
  953. X  set_cursor(cursor)
  954. X--- 152,164 ----
  955. X  
  956. X  reset_cursor()
  957. X  {
  958. X!     XDefineCursor(tool_d, canvas_win, (Cursor)cur_cursor->bitmap);
  959. X      }
  960. X  
  961. X  set_temp_cursor(cursor)
  962. X  CURSOR    cursor;
  963. X  {
  964. X!     XDefineCursor(tool_d, canvas_win, (Cursor)cursor->bitmap);
  965. X      }
  966. X  
  967. X  set_cursor(cursor)
  968. X***************
  969. X*** 182,188 ****
  970. X  CURSOR    cursor;
  971. X  {
  972. X      cur_cursor = cursor;
  973. X!     XDefineCursor(tool_d, canvas_swfd, (Cursor)cursor->bitmap);
  974. X      }
  975. X  
  976. X  set_lastaxis(a)
  977. X--- 165,171 ----
  978. X  CURSOR    cursor;
  979. X  {
  980. X      cur_cursor = cursor;
  981. X!     XDefineCursor(tool_d, canvas_win, (Cursor)cursor->bitmap);
  982. X      }
  983. X  
  984. X  set_lastaxis(a)
  985. END_OF_FILE
  986. if test 3407 -ne `wc -c <'global.c.diff'`; then
  987.     echo shar: \"'global.c.diff'\" unpacked with wrong size!
  988. fi
  989. # end of 'global.c.diff'
  990. fi
  991. if test -f 'main.c.diff' -a "${1}" != "-c" ; then 
  992.   echo shar: Will not clobber existing file \"'main.c.diff'\"
  993. else
  994. echo shar: Extracting \"'main.c.diff'\" \(3454 characters\)
  995. sed "s/^X//" >'main.c.diff' <<'END_OF_FILE'
  996. X*** main.c.old    Tue Apr 24 11:48:20 1990
  997. X--- main.c    Wed Apr 18 09:42:02 1990
  998. X***************
  999. X*** 13,29 ****
  1000. X  #include "resources.h"
  1001. X  #include "font.h"
  1002. X  
  1003. X- extern int        borderwid, windowspacing, toolstripeht;
  1004. X  extern int        ICON_COLUMN;
  1005. X  extern int        CANVAS_HEIGHT, CANVAS_WIDTH;
  1006. X! extern int        CANVAS_LEFT, CANVAS_TOP;
  1007. X! extern int        PANEL_LEFT, PANEL_TOP, PANEL_HEIGHT, PANEL_WID;
  1008. X! extern int        PANEL2_LEFT, PANEL2_TOP, PANEL2_HEIGHT, PANEL2_WID;
  1009. X! extern int        MSG_LEFT, MSG_TOP, MSG_WIDTH;
  1010. X! extern int        SIDERULER_LEFT, SIDERULER_TOP;
  1011. X  extern int        SIDERULER_WIDTH, SIDERULER_HEIGHT;
  1012. X- extern int        SIDERULER_START;
  1013. X- extern int        TOPRULER_LEFT, TOPRULER_TOP;
  1014. X  extern int        TOPRULER_WIDTH, TOPRULER_HEIGHT;
  1015. X  extern            (*canvas_rightbut_proc)();
  1016. X  extern            set_popupmenu();
  1017. X--- 13,22 ----
  1018. X  #include "resources.h"
  1019. X  #include "font.h"
  1020. X  
  1021. X  extern int        ICON_COLUMN;
  1022. X  extern int        CANVAS_HEIGHT, CANVAS_WIDTH;
  1023. X! extern int        PANEL_WID, PANEL2_WID;
  1024. X  extern int        SIDERULER_WIDTH, SIDERULER_HEIGHT;
  1025. X  extern int        TOPRULER_WIDTH, TOPRULER_HEIGHT;
  1026. X  extern            (*canvas_rightbut_proc)();
  1027. X  extern            set_popupmenu();
  1028. X***************
  1029. X*** 35,41 ****
  1030. X  Pixmap        fig_icon;
  1031. X  
  1032. X  static char    tool_name[100] = " FIG : FACILITY FOR INTERACTIVE GENERATION OF FIGURES ";
  1033. X- static RECT        icon_rect, tool_rect;
  1034. X  static            sigwinched();
  1035. X  
  1036. X  /************** FIG options ******************/
  1037. X--- 28,33 ----
  1038. X***************
  1039. X*** 43,51 ****
  1040. X  extern    appresStruct    appres;
  1041. X  
  1042. X  TOOL            tool;
  1043. X- int            WINDOW_WIDTH, WINDOW_HEIGHT;
  1044. X  char            file_header[32] = "#FIG ";
  1045. X! static char        *file = NULL;
  1046. X  
  1047. X  static Boolean    true = True;
  1048. X  static Boolean    false = False;
  1049. X--- 35,42 ----
  1050. X  extern    appresStruct    appres;
  1051. X  
  1052. X  TOOL            tool;
  1053. X  char            file_header[32] = "#FIG ";
  1054. X! static char        *filename = NULL;
  1055. X  
  1056. X  static Boolean    true = True;
  1057. X  static Boolean    false = False;
  1058. X***************
  1059. X*** 142,148 ****
  1060. X          {
  1061. X          if (*argv[i] != '-')    /* search for non - name */
  1062. X          {
  1063. X!         file = argv[i];
  1064. X          break;
  1065. X          }
  1066. X          i++;
  1067. X--- 133,139 ----
  1068. X          {
  1069. X          if (*argv[i] != '-')    /* search for non - name */
  1070. X          {
  1071. X!         filename = argv[i];
  1072. X          break;
  1073. X          }
  1074. X          i++;
  1075. X***************
  1076. X*** 251,257 ****
  1077. X  
  1078. X      /* Set the input field to true to allow keyboard input */
  1079. X      wmhints = XGetWMHints(tool_d, XtWindow(tool));
  1080. X!     wmhints->flags = InputHint;
  1081. X      wmhints->input = True;
  1082. X      XSetWMHints(tool_d, XtWindow(tool),wmhints);
  1083. X  
  1084. X--- 242,248 ----
  1085. X  
  1086. X      /* Set the input field to true to allow keyboard input */
  1087. X      wmhints = XGetWMHints(tool_d, XtWindow(tool));
  1088. X!     wmhints->flags |= InputHint;    /* add in input hint */
  1089. X      wmhints->input = True;
  1090. X      XSetWMHints(tool_d, XtWindow(tool),wmhints);
  1091. X  
  1092. X***************
  1093. X*** 292,297 ****
  1094. X--- 283,289 ----
  1095. X      }
  1096. X  
  1097. X      init_gc();
  1098. X+     init_fill_pm();
  1099. X      init_fill_gc();
  1100. X      show_fill_color();
  1101. X      show_radius();
  1102. X***************
  1103. X*** 305,312 ****
  1104. X      show_line_thickness();
  1105. X      put_msg("READY");
  1106. X      canvas_rightbut_proc = set_popupmenu;
  1107. X!     if (file != NULL)
  1108. X!         edit_file(file);
  1109. X      (void)signal(SIGINT, SIG_IGN);    /* so we don't lose work accidentally */
  1110. X      fig_icon = XCreateBitmapFromData(tool_d, XtWindow(tool),
  1111. X                       fig_bits, fig_width, fig_height);
  1112. X--- 297,304 ----
  1113. X      show_line_thickness();
  1114. X      put_msg("READY");
  1115. X      canvas_rightbut_proc = set_popupmenu;
  1116. X!     if (filename != NULL)
  1117. X!         edit_file(filename);
  1118. X      (void)signal(SIGINT, SIG_IGN);    /* so we don't lose work accidentally */
  1119. X      fig_icon = XCreateBitmapFromData(tool_d, XtWindow(tool),
  1120. X                       fig_bits, fig_width, fig_height);
  1121. END_OF_FILE
  1122. if test 3454 -ne `wc -c <'main.c.diff'`; then
  1123.     echo shar: \"'main.c.diff'\" unpacked with wrong size!
  1124. fi
  1125. # end of 'main.c.diff'
  1126. fi
  1127. if test -f 'move.c.diff' -a "${1}" != "-c" ; then 
  1128.   echo shar: Will not clobber existing file \"'move.c.diff'\"
  1129. else
  1130. echo shar: Extracting \"'move.c.diff'\" \(3594 characters\)
  1131. sed "s/^X//" >'move.c.diff' <<'END_OF_FILE'
  1132. X*** move.c.old    Tue Apr 24 11:48:21 1990
  1133. X--- move.c    Mon Apr 16 11:21:41 1990
  1134. X***************
  1135. X*** 65,71 ****
  1136. X  
  1137. X      if ((c = compound_search(x, y, TOLERANCE, &px, &py)) != NULL) {
  1138. X          set_temp_cursor(&wait_cursor);
  1139. X!         win_setmouseposition(canvas_swfd, px, py);
  1140. X          if (compoundbox_shown) draw_compoundbox(c, INV_PAINT);
  1141. X          erase_compound(c);
  1142. X          init_compounddragging(c, px, py);
  1143. X--- 65,71 ----
  1144. X  
  1145. X      if ((c = compound_search(x, y, TOLERANCE, &px, &py)) != NULL) {
  1146. X          set_temp_cursor(&wait_cursor);
  1147. X!         win_setmouseposition(canvas_win, px, py);
  1148. X          if (compoundbox_shown) draw_compoundbox(c, INV_PAINT);
  1149. X          erase_compound(c);
  1150. X          init_compounddragging(c, px, py);
  1151. X***************
  1152. X*** 77,83 ****
  1153. X      else if ((l = line_search(x, y, TOLERANCE, &px, &py)) != NULL) {
  1154. X          set_temp_cursor(&wait_cursor);
  1155. X          erase_pointmarker();
  1156. X!         win_setmouseposition(canvas_swfd, px, py);
  1157. X          draw_line(l, ERASE);
  1158. X          init_linedragging(l, px, py);
  1159. X          set_temp_cursor(&null_cursor);
  1160. X--- 77,83 ----
  1161. X      else if ((l = line_search(x, y, TOLERANCE, &px, &py)) != NULL) {
  1162. X          set_temp_cursor(&wait_cursor);
  1163. X          erase_pointmarker();
  1164. X!         win_setmouseposition(canvas_win, px, py);
  1165. X          draw_line(l, ERASE);
  1166. X          init_linedragging(l, px, py);
  1167. X          set_temp_cursor(&null_cursor);
  1168. X***************
  1169. X*** 97,103 ****
  1170. X          else
  1171. X              px = size.x;
  1172. X          }
  1173. X!         pw_text(canvas_pixwin, t->base_x - px, t->base_y, INV_PAINT, 
  1174. X              t->font, t->size, t->cstring);
  1175. X          init_textdragging(t, x, y);
  1176. X          set_temp_cursor(&null_cursor);
  1177. X--- 97,103 ----
  1178. X          else
  1179. X              px = size.x;
  1180. X          }
  1181. X!         pw_text(canvas_win, t->base_x - px, t->base_y, INV_PAINT, 
  1182. X              t->font, t->size, t->cstring);
  1183. X          init_textdragging(t, x, y);
  1184. X          set_temp_cursor(&null_cursor);
  1185. X***************
  1186. X*** 109,115 ****
  1187. X          set_temp_cursor(&wait_cursor);
  1188. X          erase_pointmarker();
  1189. X          set_temp_cursor(&null_cursor);
  1190. X!         win_setmouseposition(canvas_swfd, px, py);
  1191. X          draw_ellipse(e, background_color);
  1192. X          init_ellipsedragging(e, px, py);
  1193. X          set_temp_cursor(&null_cursor);
  1194. X--- 109,115 ----
  1195. X          set_temp_cursor(&wait_cursor);
  1196. X          erase_pointmarker();
  1197. X          set_temp_cursor(&null_cursor);
  1198. X!         win_setmouseposition(canvas_win, px, py);
  1199. X          draw_ellipse(e, background_color);
  1200. X          init_ellipsedragging(e, px, py);
  1201. X          set_temp_cursor(&null_cursor);
  1202. X***************
  1203. X*** 120,126 ****
  1204. X      else if ((a = arc_search(x, y, TOLERANCE, &px, &py)) != NULL) {
  1205. X          set_temp_cursor(&wait_cursor);
  1206. X          erase_pointmarker();
  1207. X!         win_setmouseposition(canvas_swfd, px, py);
  1208. X          draw_arc(a, background_color);
  1209. X          init_arcdragging(a, px, py);
  1210. X          set_temp_cursor(&null_cursor);
  1211. X--- 120,126 ----
  1212. X      else if ((a = arc_search(x, y, TOLERANCE, &px, &py)) != NULL) {
  1213. X          set_temp_cursor(&wait_cursor);
  1214. X          erase_pointmarker();
  1215. X!         win_setmouseposition(canvas_win, px, py);
  1216. X          draw_arc(a, background_color);
  1217. X          init_arcdragging(a, px, py);
  1218. X          set_temp_cursor(&null_cursor);
  1219. X***************
  1220. X*** 130,136 ****
  1221. X          }
  1222. X      else if ((s = spline_search(x, y, TOLERANCE, &px, &py)) != NULL) {
  1223. X          set_temp_cursor(&wait_cursor);
  1224. X!         win_setmouseposition(canvas_swfd, px, py);
  1225. X          erase_pointmarker();
  1226. X          draw_spline(s, ERASE);
  1227. X          init_splinedragging(s, px, py);
  1228. X--- 130,136 ----
  1229. X          }
  1230. X      else if ((s = spline_search(x, y, TOLERANCE, &px, &py)) != NULL) {
  1231. X          set_temp_cursor(&wait_cursor);
  1232. X!         win_setmouseposition(canvas_win, px, py);
  1233. X          erase_pointmarker();
  1234. X          draw_spline(s, ERASE);
  1235. X          init_splinedragging(s, px, py);
  1236. END_OF_FILE
  1237. if test 3594 -ne `wc -c <'move.c.diff'`; then
  1238.     echo shar: \"'move.c.diff'\" unpacked with wrong size!
  1239. fi
  1240. # end of 'move.c.diff'
  1241. fi
  1242. if test -f 'msgsw.c.diff' -a "${1}" != "-c" ; then 
  1243.   echo shar: Will not clobber existing file \"'msgsw.c.diff'\"
  1244. else
  1245. echo shar: Extracting \"'msgsw.c.diff'\" \(2876 characters\)
  1246. sed "s/^X//" >'msgsw.c.diff' <<'END_OF_FILE'
  1247. X*** msgsw.c.old    Tue Apr 24 11:48:22 1990
  1248. X--- msgsw.c    Fri Apr 20 14:35:15 1990
  1249. X***************
  1250. X*** 16,22 ****
  1251. X  #include "psfonts.h"
  1252. X  
  1253. X  extern int        errno;
  1254. X- extern int        receiving_msg;
  1255. X  extern int        action_on;
  1256. X  extern            null_proc();
  1257. X  
  1258. X--- 16,21 ----
  1259. X***************
  1260. X*** 43,67 ****
  1261. X  
  1262. X  #define            BUF_SIZE        80
  1263. X  
  1264. X- static            (*msgsw_kbd_proc)();
  1265. X- static            (*msgsw_leftbut_proc)();
  1266. X- static            (*msgsw_rightbut_proc)();
  1267. X- static            (*recipient)();
  1268. X- 
  1269. X- static char        msg_received[BUF_SIZE];
  1270. X  static char        prompt[BUF_SIZE];
  1271. X- static int        len_prompt;
  1272. X- static int        input_base_x;
  1273. X  
  1274. X  static            msg_selected();
  1275. X  static            msg_sighandler();
  1276. X  
  1277. X- static            (*saved_canvas_kbd_proc)();
  1278. X- static            (*saved_canvas_locmove_proc)();
  1279. X- static            (*saved_canvas_leftbut_proc)();
  1280. X- static            (*saved_canvas_middlebut_proc)();
  1281. X- static            (*saved_canvas_rightbut_proc)();
  1282. X- 
  1283. X  static Arg      msg_args[] =
  1284. X  {
  1285. X      /* 0 */ { XtNwidth, (XtArgVal) 0 },
  1286. X--- 42,52 ----
  1287. X***************
  1288. X*** 104,111 ****
  1289. X          addn_args[0].value = (XtArgVal)bold_font;
  1290. X          XtSetValues(msg_sw, addn_args, XtNumber(addn_args));
  1291. X      }
  1292. X!     msgswfd = XtWindow(msg_sw);
  1293. X!     XDefineCursor(tool_d, msgswfd, (Cursor)pencil_cursor.bitmap);
  1294. X  }
  1295. X  
  1296. X  /*VARARGS1*/
  1297. X--- 89,96 ----
  1298. X          addn_args[0].value = (XtArgVal)bold_font;
  1299. X          XtSetValues(msg_sw, addn_args, XtNumber(addn_args));
  1300. X      }
  1301. X!     msg_win = XtWindow(msg_sw);
  1302. X!     XDefineCursor(tool_d, msg_win, (Cursor)pencil_cursor.bitmap);
  1303. X  }
  1304. X  
  1305. X  /*VARARGS1*/
  1306. X***************
  1307. X*** 123,129 ****
  1308. X  /*VARARGS1*/
  1309. X  put_fmsg(format, arg1, arg2, arg3, arg4, arg5)
  1310. X      char    *format;
  1311. X!     float    arg1, arg2, arg3, arg4, arg5;
  1312. X  {
  1313. X      sprintf(prompt, format, arg1, arg2, arg3, arg4, arg5);
  1314. X      msg_args[2].value = (XtArgVal)prompt;
  1315. X--- 108,114 ----
  1316. X  /*VARARGS1*/
  1317. X  put_fmsg(format, arg1, arg2, arg3, arg4, arg5)
  1318. X      char    *format;
  1319. X!     double    arg1, arg2, arg3, arg4, arg5;
  1320. X  {
  1321. X      sprintf(prompt, format, arg1, arg2, arg3, arg4, arg5);
  1322. X      msg_args[2].value = (XtArgVal)prompt;
  1323. X***************
  1324. X*** 136,154 ****
  1325. X      XtSetValues(msg_sw, &msg_args[2], 1);
  1326. X  }
  1327. X  
  1328. X- static
  1329. X- end_char_input()
  1330. X- {
  1331. X-     receiving_msg = 0;  /*  msg input has been received  */
  1332. X-     terminate_char_handler();
  1333. X-     strcpy(&prefix[leng_prefix], suffix);
  1334. X-     strcpy(msg_received, prefix);
  1335. X-     strcpy(&prompt[len_prompt], prefix);
  1336. X-     if (recipient != NULL) (* recipient) (msg_received);
  1337. X-     restore_event_proc();
  1338. X-     return;
  1339. X-     }
  1340. X- 
  1341. X  init_msg_receiving(msg_recipient, p)
  1342. X      int        (*msg_recipient)();
  1343. X      char        *p;
  1344. X--- 121,126 ----
  1345. X***************
  1346. X*** 158,172 ****
  1347. X      prompt_string(p, reply);
  1348. X      (*msg_recipient)(reply);
  1349. X  }
  1350. X- 
  1351. X- restore_event_proc()
  1352. X- {
  1353. X-     canvas_kbd_proc = saved_canvas_kbd_proc;
  1354. X-     canvas_locmove_proc = saved_canvas_locmove_proc;
  1355. X-     canvas_leftbut_proc = saved_canvas_leftbut_proc;
  1356. X-     canvas_middlebut_proc = saved_canvas_middlebut_proc;
  1357. X-     canvas_rightbut_proc = saved_canvas_rightbut_proc;
  1358. X-     }
  1359. X  
  1360. X  blink_msg()
  1361. X  {
  1362. X--- 130,135 ----
  1363. END_OF_FILE
  1364. if test 2876 -ne `wc -c <'msgsw.c.diff'`; then
  1365.     echo shar: \"'msgsw.c.diff'\" unpacked with wrong size!
  1366. fi
  1367. # end of 'msgsw.c.diff'
  1368. fi
  1369. if test -f 'popup.c.diff' -a "${1}" != "-c" ; then 
  1370.   echo shar: Will not clobber existing file \"'popup.c.diff'\"
  1371. else
  1372. echo shar: Extracting \"'popup.c.diff'\" \(4222 characters\)
  1373. sed "s/^X//" >'popup.c.diff' <<'END_OF_FILE'
  1374. X*** popup.c.old    Tue Apr 24 11:48:29 1990
  1375. X--- popup.c    Mon Apr 16 11:22:21 1990
  1376. X***************
  1377. X*** 26,31 ****
  1378. X--- 26,32 ----
  1379. X  extern            save_file();
  1380. X  extern            save_and_exit();
  1381. X  extern            write_bitmap();
  1382. X+ extern            Reset_cursor();
  1383. X  
  1384. X  /********************  local variables  ***************************/
  1385. X  
  1386. X***************
  1387. X*** 43,61 ****
  1388. X      {MENU_IMAGESTRING, "Change Directory",    (caddr_t) F_CHDIR},
  1389. X      {MENU_IMAGESTRING, "Print Working Directory",    (caddr_t) F_PWDIR},
  1390. X      {MENU_IMAGESTRING, "Save & Quit",    (caddr_t) F_SAVE_N_EXIT},
  1391. X-     /*
  1392. X      {MENU_IMAGESTRING, "Save as BITMAP ..",    (caddr_t) F_SAVE_BITMAP},
  1393. X-     */
  1394. X      };
  1395. X! static MENU        menu_body = {
  1396. X!                 MENU_IMAGESTRING,
  1397. X!                 "commands",
  1398. X!                 sizeof(pumenu_items)/sizeof(MENUITEM),
  1399. X!                 pumenu_items,
  1400. X!                 (MENU *) NULL,
  1401. X!                 (caddr_t) NULL
  1402. X!                 };
  1403. X! static MENU        *menu_ptr = &menu_body;
  1404. X  static char quit_msg[] = "CONFIRM with LEFT button, CANCEL with RIGHT or MIDDLE button";
  1405. X  static char edit_msg[] = "Figures are modified; please CONFIRM with LEFT button or CANCEL with RIGHT button";
  1406. X  
  1407. X--- 44,52 ----
  1408. X      {MENU_IMAGESTRING, "Change Directory",    (caddr_t) F_CHDIR},
  1409. X      {MENU_IMAGESTRING, "Print Working Directory",    (caddr_t) F_PWDIR},
  1410. X      {MENU_IMAGESTRING, "Save & Quit",    (caddr_t) F_SAVE_N_EXIT},
  1411. X      {MENU_IMAGESTRING, "Save as BITMAP ..",    (caddr_t) F_SAVE_BITMAP},
  1412. X      };
  1413. X! 
  1414. X  static char quit_msg[] = "CONFIRM with LEFT button, CANCEL with RIGHT or MIDDLE button";
  1415. X  static char edit_msg[] = "Figures are modified; please CONFIRM with LEFT button or CANCEL with RIGHT button";
  1416. X  
  1417. X***************
  1418. X*** 81,86 ****
  1419. X--- 72,91 ----
  1420. X          { XtNcallback, (XtArgVal)pane_callbacks },
  1421. X  };
  1422. X  
  1423. X+ XtActionsRec popup_actions[] =
  1424. X+ {
  1425. X+     { "Reset_cursor", (XtActionProc)Reset_cursor },
  1426. X+ };
  1427. X+ 
  1428. X+ Reset_cursor(tool, event, params, nparams)
  1429. X+     TOOL    tool;
  1430. X+     XEvent    *event;
  1431. X+     String    *params;
  1432. X+     Cardinal *nparams;
  1433. X+ {
  1434. X+     reset_cursor();
  1435. X+ }
  1436. X+ 
  1437. X  TOOL        menu;
  1438. X  
  1439. X  int 
  1440. X***************
  1441. X*** 97,106 ****
  1442. X      menu = XtCreatePopupShell("popup_menu", overrideShellWidgetClass, tool,
  1443. X          menu_args, XtNumber(menu_args));
  1444. X      popdown_actions = XtParseTranslationTable(
  1445. X!         "<Btn3Up>:MenuPopdown()\n");
  1446. X!         /*
  1447. X!         <LeaveWindow>:MenuPopdown()\n");
  1448. X!         */
  1449. X      XtOverrideTranslations(menu, popdown_actions);
  1450. X      panes = XtCreateManagedWidget("menu", boxWidgetClass, menu, menu_args,
  1451. X          XtNumber(menu_args));
  1452. X--- 102,109 ----
  1453. X      menu = XtCreatePopupShell("popup_menu", overrideShellWidgetClass, tool,
  1454. X          menu_args, XtNumber(menu_args));
  1455. X      popdown_actions = XtParseTranslationTable(
  1456. X!         "<Btn3Up>:MenuPopdown()Reset_cursor()\n");
  1457. X!         /*<LeaveWindow>:MenuPopdown()Reset_cursor()\n");*/
  1458. X      XtOverrideTranslations(menu, popdown_actions);
  1459. X      panes = XtCreateManagedWidget("menu", boxWidgetClass, menu, menu_args,
  1460. X          XtNumber(menu_args));
  1461. X***************
  1462. X*** 107,112 ****
  1463. X--- 110,116 ----
  1464. X      pane_actions = XtParseTranslationTable(
  1465. X          "<EnterWindow>:set()\n\
  1466. X          <Btn3Up>:notify()unset()\n");
  1467. X+     XtAddActions(popup_actions, XtNumber(popup_actions));
  1468. X      for (i = 0; i < XtNumber(pumenu_items); i++)
  1469. X      {
  1470. X          mi = &pumenu_items[i];
  1471. X***************
  1472. X*** 154,160 ****
  1473. X  {
  1474. X  }
  1475. X  
  1476. X! void pane_select(widget, mi)
  1477. X      TOOL            widget;
  1478. X      MENUITEM        *mi;
  1479. X  {
  1480. X--- 158,165 ----
  1481. X  {
  1482. X  }
  1483. X  
  1484. X! void 
  1485. X! pane_select(widget, mi)
  1486. X      TOOL            widget;
  1487. X      MENUITEM        *mi;
  1488. X  {
  1489. X***************
  1490. X*** 214,219 ****
  1491. X--- 219,225 ----
  1492. X          init_msg_receiving(write_bitmap, "Save bitmap to file : ");
  1493. X          break;
  1494. X          }
  1495. X+     Reset_cursor();
  1496. X      XtPopdown(menu);
  1497. X      }
  1498. X  
  1499. X***************
  1500. X*** 227,233 ****
  1501. X          tool_destroy(tool);
  1502. X          exit(0);
  1503. X          }
  1504. X!     if (wmgr_confirm(canvas_swfd, quit_msg) == -1) {
  1505. X          tool_destroy(tool);
  1506. X          exit(0);
  1507. X          }
  1508. X--- 233,239 ----
  1509. X          tool_destroy(tool);
  1510. X          exit(0);
  1511. X          }
  1512. X!     if (wmgr_confirm(canvas_win, quit_msg) == -1) {
  1513. X          tool_destroy(tool);
  1514. X          exit(0);
  1515. X          }
  1516. X***************
  1517. X*** 252,258 ****
  1518. X  edit()
  1519. X      {
  1520. X      if (!no_object() && figure_modified)
  1521. X!         if (wmgr_confirm(canvas_swfd, edit_msg) != -1) 
  1522. X          return;
  1523. X      init_msg_receiving(edit_file, "Edit file : ");
  1524. X      }
  1525. X--- 258,264 ----
  1526. X  edit()
  1527. X      {
  1528. X      if (!no_object() && figure_modified)
  1529. X!         if (wmgr_confirm(canvas_win, edit_msg) != -1) 
  1530. X          return;
  1531. X      init_msg_receiving(edit_file, "Edit file : ");
  1532. X      }
  1533. END_OF_FILE
  1534. if test 4222 -ne `wc -c <'popup.c.diff'`; then
  1535.     echo shar: \"'popup.c.diff'\" unpacked with wrong size!
  1536. fi
  1537. # end of 'popup.c.diff'
  1538. fi
  1539. if test -f 'printfonts.c.diff' -a "${1}" != "-c" ; then 
  1540.   echo shar: Will not clobber existing file \"'printfonts.c.diff'\"
  1541. else
  1542. echo shar: Extracting \"'printfonts.c.diff'\" \(2898 characters\)
  1543. sed "s/^X//" >'printfonts.c.diff' <<'END_OF_FILE'
  1544. X*** printfonts.c.old    Tue Apr 24 11:48:30 1990
  1545. X--- printfonts.c    Thu Apr 12 15:47:46 1990
  1546. X***************
  1547. X*** 18,37 ****
  1548. X  extern    Pixmap    font_menu_bitmaps[];
  1549. X  extern    struct    _fstruct  fontnames[];    /* font names */
  1550. X  
  1551. X  /********************  local variables  ***************************/
  1552. X  
  1553. X  static MENUITEM fontmenu_items[NUMFONTS];
  1554. X  
  1555. X- static MENU        fontmenu_body = {
  1556. X-                 MENU_IMAGESTRING,
  1557. X-                 "printerfonts",
  1558. X-                 sizeof(fontmenu_items)/sizeof(MENUITEM),
  1559. X-                 fontmenu_items,
  1560. X-                 (MENU *) NULL,
  1561. X-                 (caddr_t) NULL
  1562. X-                 };
  1563. X- static MENU        *fontmenu_ptr = &fontmenu_body;
  1564. X- 
  1565. X  static Arg    fontmenu_args[] =
  1566. X  {
  1567. X      { XtNvSpace, (XtArgVal) 1 },
  1568. X--- 18,32 ----
  1569. X  extern    Pixmap    font_menu_bitmaps[];
  1570. X  extern    struct    _fstruct  fontnames[];    /* font names */
  1571. X  
  1572. X+ /* GLOBAL */
  1573. X+ 
  1574. X+ int    *font_sel;        /* pointer to store font selected from popup */
  1575. X+ TOOL    image_widget;        /* which widget to store image of font in */
  1576. X+ 
  1577. X  /********************  local variables  ***************************/
  1578. X  
  1579. X  static MENUITEM fontmenu_items[NUMFONTS];
  1580. X  
  1581. X  static Arg    fontmenu_args[] =
  1582. X  {
  1583. X      { XtNvSpace, (XtArgVal) 1 },
  1584. X***************
  1585. X*** 87,93 ****
  1586. X      register int        i;
  1587. X      register MENUITEM    *mi;
  1588. X      XtTranslations        popdown_actions, pane_actions;
  1589. X-     Arg            my_list;
  1590. X  
  1591. X      fontmenu = XtCreatePopupShell("font_menu", overrideShellWidgetClass, tool,
  1592. X          fontmenu_args, XtNumber(fontmenu_args));
  1593. X--- 82,87 ----
  1594. X***************
  1595. X*** 105,111 ****
  1596. X          fontmenu_items[i].type = MENU_IMAGESTRING;    /* put the fontnames in menu */
  1597. X          fontmenu_items[i].label = fontnames[i].psfont;
  1598. X          fontmenu_items[i].info = (caddr_t) i;        /* index for font # */
  1599. X-         mi = &fontmenu_items[i];
  1600. X      }
  1601. X      
  1602. X      main_pane_args[0].value = (XtArgVal)"Printer Fonts";
  1603. X--- 99,104 ----
  1604. X***************
  1605. X*** 143,149 ****
  1606. X  
  1607. X  setup_fontmenu()
  1608. X      {
  1609. X-     Arg        psargs[2];
  1610. X      register int    i;
  1611. X  
  1612. X      /* Create the bitmaps */
  1613. X--- 136,141 ----
  1614. X***************
  1615. X*** 169,179 ****
  1616. X  
  1617. X  setup_fontmenu_cursor()
  1618. X      {
  1619. X-     register int    i;
  1620. X- 
  1621. X      if (cursinit)        /* already defined */
  1622. X          return;
  1623. X- 
  1624. X      cursinit = 1;
  1625. X      /* Define the cursor for the main menu form */
  1626. X      XDefineCursor(tool_d, XtWindow(fontpanes), (Cursor)arrow_cursor.bitmap);
  1627. X--- 161,168 ----
  1628. X***************
  1629. X*** 184,194 ****
  1630. X  MENUITEM *mi;
  1631. X  {
  1632. X      char *    font_name = mi->label;
  1633. X  
  1634. X!     font_button = (int) mi->info;
  1635. X      put_msg("Font: %s",font_name);
  1636. X      /* put image of font in indicator window */
  1637. X!     psfont_args[6].value = (XtArgVal) font_menu_bitmaps[font_button];
  1638. X!     XtSetValues(psfont, &psfont_args[6], 1);
  1639. X      XtPopdown(fontmenu);
  1640. X      }
  1641. X--- 173,184 ----
  1642. X  MENUITEM *mi;
  1643. X  {
  1644. X      char *    font_name = mi->label;
  1645. X+     Arg    args[1];
  1646. X  
  1647. X!     *font_sel = (int) mi->info;    /* set current font to one selected */
  1648. X      put_msg("Font: %s",font_name);
  1649. X      /* put image of font in indicator window */
  1650. X!     XtSetArg(args[0], XtNbitmap, font_menu_bitmaps[*font_sel]);
  1651. X!     XtSetValues(image_widget, args, ONE);
  1652. X      XtPopdown(fontmenu);
  1653. X      }
  1654. END_OF_FILE
  1655. if test 2898 -ne `wc -c <'printfonts.c.diff'`; then
  1656.     echo shar: \"'printfonts.c.diff'\" unpacked with wrong size!
  1657. fi
  1658. # end of 'printfonts.c.diff'
  1659. fi
  1660. if test -f 'scale.c.diff' -a "${1}" != "-c" ; then 
  1661.   echo shar: Will not clobber existing file \"'scale.c.diff'\"
  1662. else
  1663. echo shar: Extracting \"'scale.c.diff'\" \(2587 characters\)
  1664. sed "s/^X//" >'scale.c.diff' <<'END_OF_FILE'
  1665. X*** scale.c.old    Tue Apr 24 11:48:39 1990
  1666. X--- scale.c    Mon Apr 16 11:23:18 1990
  1667. X***************
  1668. X*** 73,79 ****
  1669. X          cosa = fabs(dx / l);  sina = fabs(dy / l);
  1670. X          
  1671. X          fromx = cur_x;  fromy = cur_y;
  1672. X!         win_setmouseposition(canvas_swfd, cur_x, cur_y);
  1673. X          draw_compoundbox(cmpnd, INV_PAINT);
  1674. X          draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
  1675. X          set_latestcompound(cmpnd);
  1676. X--- 73,79 ----
  1677. X          cosa = fabs(dx / l);  sina = fabs(dy / l);
  1678. X          
  1679. X          fromx = cur_x;  fromy = cur_y;
  1680. X!         win_setmouseposition(canvas_win, cur_x, cur_y);
  1681. X          draw_compoundbox(cmpnd, INV_PAINT);
  1682. X          draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
  1683. X          set_latestcompound(cmpnd);
  1684. X***************
  1685. X*** 82,88 ****
  1686. X          canvas_leftbut_proc = canvas_rightbut_proc = null_proc;
  1687. X          set_action_on();
  1688. X          set_temp_cursor(&null_cursor);
  1689. X!         win_setmouseposition(canvas_swfd, x, y);
  1690. X      }
  1691. X      else if ((cmpnd = compound_search(x, y, TOLERANCE, &cur_x, &cur_y))
  1692. X           != NULL )
  1693. X--- 82,88 ----
  1694. X          canvas_leftbut_proc = canvas_rightbut_proc = null_proc;
  1695. X          set_action_on();
  1696. X          set_temp_cursor(&null_cursor);
  1697. X!         win_setmouseposition(canvas_win, x, y);
  1698. X      }
  1699. X      else if ((cmpnd = compound_search(x, y, TOLERANCE, &cur_x, &cur_y))
  1700. X           != NULL )
  1701. X***************
  1702. X*** 130,136 ****
  1703. X              break;
  1704. X          }
  1705. X          /*  erase the compound box. */
  1706. X!         win_setmouseposition(canvas_swfd, cur_x, cur_y);
  1707. X          draw_compoundbox(cmpnd, INV_PAINT);
  1708. X          draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
  1709. X          set_latestcompound(cmpnd);
  1710. X--- 130,136 ----
  1711. X              break;
  1712. X          }
  1713. X          /*  erase the compound box. */
  1714. X!         win_setmouseposition(canvas_win, cur_x, cur_y);
  1715. X          draw_compoundbox(cmpnd, INV_PAINT);
  1716. X          draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
  1717. X          set_latestcompound(cmpnd);
  1718. X***************
  1719. X*** 139,145 ****
  1720. X          canvas_leftbut_proc = canvas_rightbut_proc = null_proc;
  1721. X          set_action_on();
  1722. X          set_temp_cursor(&null_cursor);
  1723. X!         win_setmouseposition(canvas_swfd, x, y);
  1724. X      }
  1725. X  }
  1726. X  
  1727. X--- 139,145 ----
  1728. X          canvas_leftbut_proc = canvas_rightbut_proc = null_proc;
  1729. X          set_action_on();
  1730. X          set_temp_cursor(&null_cursor);
  1731. X!         win_setmouseposition(canvas_win, x, y);
  1732. X      }
  1733. X  }
  1734. X  
  1735. X***************
  1736. X*** 149,155 ****
  1737. X  {
  1738. X      draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
  1739. X      compute_adjustposition(x, y);
  1740. X!     win_setmouseposition(canvas_swfd, cur_x, cur_y);
  1741. X      draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
  1742. X      }
  1743. X  
  1744. X--- 149,155 ----
  1745. X  {
  1746. X      draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
  1747. X      compute_adjustposition(x, y);
  1748. X!     win_setmouseposition(canvas_win, cur_x, cur_y);
  1749. X      draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
  1750. X      }
  1751. X  
  1752. END_OF_FILE
  1753. if test 2587 -ne `wc -c <'scale.c.diff'`; then
  1754.     echo shar: \"'scale.c.diff'\" unpacked with wrong size!
  1755. fi
  1756. # end of 'scale.c.diff'
  1757. fi
  1758. if test -f 'util.c.diff' -a "${1}" != "-c" ; then 
  1759.   echo shar: Will not clobber existing file \"'util.c.diff'\"
  1760. else
  1761. echo shar: Extracting \"'util.c.diff'\" \(2703 characters\)
  1762. sed "s/^X//" >'util.c.diff' <<'END_OF_FILE'
  1763. X*** util.c.old    Tue Apr 24 11:48:43 1990
  1764. X--- util.c    Mon Apr 16 11:26:25 1990
  1765. X***************
  1766. X*** 161,169 ****
  1767. X  toggle_ellipsepointmarker(e)
  1768. X  F_ellipse    *e;
  1769. X  {
  1770. X!     set_marker(canvas_pixwin, e->start.x-2, e->start.y-2, 5, 5, INV_PAINT,
  1771. X          &pmarker, 0, 0);
  1772. X!     set_marker(canvas_pixwin, e->end.x-2, e->end.y-2, 5, 5, INV_PAINT,
  1773. X          &pmarker, 0, 0);
  1774. X      }
  1775. X  
  1776. X--- 161,169 ----
  1777. X  toggle_ellipsepointmarker(e)
  1778. X  F_ellipse    *e;
  1779. X  {
  1780. X!     set_marker(canvas_win, e->start.x-2, e->start.y-2, 5, 5, INV_PAINT,
  1781. X          &pmarker, 0, 0);
  1782. X!     set_marker(canvas_win, e->end.x-2, e->end.y-2, 5, 5, INV_PAINT,
  1783. X          &pmarker, 0, 0);
  1784. X      }
  1785. X  
  1786. X***************
  1787. X*** 170,180 ****
  1788. X  toggle_arcpointmarker(a)
  1789. X  F_arc    *a;
  1790. X  {
  1791. X!     set_marker(canvas_pixwin, a->point[0].x-2, a->point[0].y-2, 5, 5,
  1792. X          INV_PAINT, &pmarker, 0, 0);
  1793. X!     set_marker(canvas_pixwin, a->point[1].x-2, a->point[1].y-2, 5, 5,
  1794. X          INV_PAINT, &pmarker, 0, 0);
  1795. X!     set_marker(canvas_pixwin, a->point[2].x-2, a->point[2].y-2, 5, 5,
  1796. X          INV_PAINT, &pmarker, 0, 0);
  1797. X      }
  1798. X  
  1799. X--- 170,180 ----
  1800. X  toggle_arcpointmarker(a)
  1801. X  F_arc    *a;
  1802. X  {
  1803. X!     set_marker(canvas_win, a->point[0].x-2, a->point[0].y-2, 5, 5,
  1804. X          INV_PAINT, &pmarker, 0, 0);
  1805. X!     set_marker(canvas_win, a->point[1].x-2, a->point[1].y-2, 5, 5,
  1806. X          INV_PAINT, &pmarker, 0, 0);
  1807. X!     set_marker(canvas_win, a->point[2].x-2, a->point[2].y-2, 5, 5,
  1808. X          INV_PAINT, &pmarker, 0, 0);
  1809. X      }
  1810. X  
  1811. X***************
  1812. X*** 188,197 ****
  1813. X      fx = p->x;  fy = p->y;
  1814. X      for (p = p->next; p!= NULL; p = p->next) {
  1815. X          x = p->x;  y = p->y;
  1816. X!         set_marker(canvas_pixwin, x-2, y-2, 5, 5, INV_PAINT, &pmarker, 0, 0);
  1817. X          }
  1818. X      if (x != fx || y != fy) {
  1819. X!         set_marker(canvas_pixwin, fx-2, fy-2, 5, 5, INV_PAINT, 
  1820. X              &pmarker, 0, 0);
  1821. X          }
  1822. X      }
  1823. X--- 188,197 ----
  1824. X      fx = p->x;  fy = p->y;
  1825. X      for (p = p->next; p!= NULL; p = p->next) {
  1826. X          x = p->x;  y = p->y;
  1827. X!         set_marker(canvas_win, x-2, y-2, 5, 5, INV_PAINT, &pmarker, 0, 0);
  1828. X          }
  1829. X      if (x != fx || y != fy) {
  1830. X!         set_marker(canvas_win, fx-2, fy-2, 5, 5, INV_PAINT, 
  1831. X              &pmarker, 0, 0);
  1832. X          }
  1833. X      }
  1834. X***************
  1835. X*** 206,215 ****
  1836. X      fx = p->x;  fy = p->y;
  1837. X      for (p = p->next; p!= NULL; p = p->next) {
  1838. X          x = p->x;  y = p->y;
  1839. X!         set_marker(canvas_pixwin, x-2, y-2, 5, 5, INV_PAINT, &pmarker, 0, 0);
  1840. X          }
  1841. X      if (x != fx || y != fy) {
  1842. X!         set_marker(canvas_pixwin, fx-2, fy-2, 5, 5, INV_PAINT, 
  1843. X              &pmarker, 0, 0);
  1844. X          }
  1845. X      }
  1846. X--- 206,215 ----
  1847. X      fx = p->x;  fy = p->y;
  1848. X      for (p = p->next; p!= NULL; p = p->next) {
  1849. X          x = p->x;  y = p->y;
  1850. X!         set_marker(canvas_win, x-2, y-2, 5, 5, INV_PAINT, &pmarker, 0, 0);
  1851. X          }
  1852. X      if (x != fx || y != fy) {
  1853. X!         set_marker(canvas_win, fx-2, fy-2, 5, 5, INV_PAINT, 
  1854. X              &pmarker, 0, 0);
  1855. X          }
  1856. X      }
  1857. END_OF_FILE
  1858. if test 2703 -ne `wc -c <'util.c.diff'`; then
  1859.     echo shar: \"'util.c.diff'\" unpacked with wrong size!
  1860. fi
  1861. # end of 'util.c.diff'
  1862. fi
  1863. echo shar: End of archive 2 \(of 6\).
  1864. cp /dev/null ark2isdone
  1865. MISSING=""
  1866. for I in 1 2 3 4 5 6 ; do
  1867.     if test ! -f ark${I}isdone ; then
  1868.     MISSING="${MISSING} ${I}"
  1869.     fi
  1870. done
  1871. if test "${MISSING}" = "" ; then
  1872.     echo You have unpacked all 6 archives.
  1873.     rm -f ark[1-9]isdone
  1874. else
  1875.     echo You still need to unpack the following archives:
  1876.     echo "        " ${MISSING}
  1877. fi
  1878. ##  End of shell archive.
  1879. exit 0
  1880.  
  1881. dan
  1882. -----------------------------------------------------------
  1883.             O'Reilly && Associates
  1884.         argv@sun.com / argv@ora.com
  1885.        632 Petaluma Ave, Sebastopol, CA 95472 
  1886.      800-338-NUTS, in CA: 800-533-NUTS, FAX 707-829-0104
  1887.     Opinions expressed reflect those of the author only.
  1888.